import request from "@/utils/request";
import { AxiosPromise } from "axios";


// 用户列表
export let _userList = (params: listData) => {
    return request({
        url: "/user/list",
        method: "GET",
        params
    })
}


// 用户添加
export let _userAdd = (data: userAddData): AxiosPromise<userAddResData> => {
    return request({
        url: "/user/add",
        method: "POST",
        data
    })
}


// 用户编辑
export let _userEdit = (data: userEditSubmitData): AxiosPromise<userAddResData> => {
    return request({
        url: "/user/edit",
        method: "POST",
        data
    })
}


// 用户删除单个
export let _userDel = (params: userDelData): AxiosPromise<userAddResData> => {
    return request({
        url: "/user/del",
        method: "GET",
        params
    })
}



// 用户删除多个
export let _userBatchdel = (params: userDelBatData): AxiosPromise<userAddResData> => {
    return request({
        url: "/user/batchdel",
        method: "GET",
        params
    })
}

